#include <boost/bimap.hpp>
#include <boost/bimap/unordered_set_of.hpp>
#include <boost/bimap/support/lambda.hpp>
#include <iostream>
#include <string>
 
int main()
{
    typedef boost::bimap<boost::bimaps::set_of<std::string>, 
        boost::bimaps::unordered_set_of<int> > bimap; //*default container type
    bimap persons;
 
    persons.insert(bimap::value_type("Euler",20));
    persons.insert(bimap::value_type("Gauss",21)); 
    persons.insert(bimap::value_type("Poincare",22));
 
    bimap::left_map::iterator it = persons.left.find("Poincare");
    persons.left.modify_key(it, boost::bimaps::_key = "Hilbert"); //*_key
    bimap::right_map::iterator it_right = persons.right.find(22);
    persons.right.modify_key(it_right, boost::bimaps::_data = 24);//*_data
    for (bimap::const_iterator iter = persons.begin(); iter!=persons.end(); ++iter)
        std::cout << iter->left << " : " << iter->right << std::endl;
}
